package com.geekjob1120.geekjob1120pay;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


//@FeignClient("geekjob-pay")
public interface PayFeignClient {

    @PostMapping(value = "/pay/payService",produces = {MediaType.APPLICATION_XML_VALUE},consumes = {MediaType.APPLICATION_XML_VALUE})
    PayServiceIO payServiceByXMl(@RequestBody PayServiceIO in);

    @PostMapping(value = "/pay/payService",produces = {MediaType.APPLICATION_JSON_VALUE},consumes = {MediaType.APPLICATION_JSON_VALUE})
    PayServiceIO payServiceByJson(@RequestBody PayServiceIO in);

    @GetMapping(value = "/payOrder/{orderId}",consumes = {MediaType.APPLICATION_XML_VALUE})
    PayServiceIO searchOrderByXMl(@PathVariable("orderId") String orderId);

    @GetMapping(value = "/payOrder/{orderId}",consumes = {MediaType.APPLICATION_JSON_VALUE})
    PayServiceIO searchOrderByJson(@PathVariable("orderId")  String orderId);
}
